<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">

<head th:replace="top::html">
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
</head>

<body class="fixed hold-transition skin-blue">
	<div class="wrapper">
		<div th:replace="tophtml::html"></div>
		<div th:replace="left::html"></div>
		<div class="content-wrapper">
			<section class="content-header">
				<h1>
					统计 <small>统计上传的项目、需求等</small>
				</h1>
				<ol class="breadcrumb">
					<li><a href="/index"><i class="fa fa-dashboard"></i>用户中心</a></li>
					<li><a href="">统计</a></li>
				</ol>
			</section>
			<section class="content container-fluid">
				<form class="form-inline" th:action="@{/demand/queryStatistics}" method="get" id="from1">
					<div class="form-group">
						<label style="margin-left: 30px;">时间</label>
						<div class="input-group date">
							<div class="input-group-addon">
								<i class="fa fa-calendar"></i>
							</div>
							<input type="text" class="form-control pull-right" style="width: 164px;" id="datepicker" name="beginDate" th:value="${param.beginDate}">
						</div>
					</div>
					<span style="margin-left: 15px;">—</span>
					<div class="form-group">
						<div class="input-group date" style="margin-left: 15px;">
							<div class="input-group-addon">
								<i class="fa fa-calendar"></i>
							</div>
							<input type="text" class="form-control pull-right" style="width: 164px;" id="datepicker3" name="endDate" th:value="${param.endDate}">
						</div>
					</div>
					<button type="submit" class="btn btn-primary" style="margin-left: 40px;">搜索</button>
				</form>
				<br>
				<div class="box">
					<div class="box-body">
						<table class="table table-bordered">
							<tbody>
								<tr>
									<th>录入人</th>
									<th>汇总(新增|修改)</th>
									<th>项目(新增|修改)</th>
									<th>需求(新增|修改)</th>
									<th>客户(新增|修改)</th>
									<th>专家(新增|修改)</th>
									<th>对接(新增|修改)</th>
								</tr>
								<tr th:each="e : ${map}">
									<td th:each="content, stat : ${e.value}" th:if="${stat.count} <= 2">
										<span th:text="${content}"></span>
									</td>
									<td th:each="content, stat : ${e.value}" th:if="${stat.count} > 2" th:with="addNum=${#strings.arraySplit(content, '-')[0]},updateNum=${#strings.arraySplit(content, '-')[1]}">
										<span th:with="addNum=${#strings.arraySplit(content, '-')[0]}" th:if="${stat.count} > 2 and ${addNum} == '0'">0</span>
										<a th:if="${stat.count} > 2 and ${addNum} != '0'" th:href="@{'/'+${routeList.get(stat.index-2)}+'/'+detailStatistics(beginDate=${param.beginDate},endDate=${param.endDate},userId=${e.key})}" th:text="${addNum}" target="blank_"></a>
										<span th:if="${stat.count} > 2">/</span>
										<span th:if="${stat.count} > 2 and ${updateNum} == '0'">0</span>
										<a th:if="${stat.count} > 2 and ${updateNum} != '0'" th:href="@{'/'+${routeList.get(stat.index-2)}+'/'+updateDetailStatistics(beginDate=${param.beginDate},endDate=${param.endDate},userId=${e.key},operaIndex=${stat.index}-2,fullname=${e.value[0]})}" th:text="${updateNum}" target="blank_"></a>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</section>
		</div>
		<div th:replace="footer::html"></div>
		<div class="control-sidebar-bg"></div>
	</div>
	<div th:replace="bottom::html"></div>
</body>

</html>